package com.zoo.diannaopeijian.mapper;

import com.zoo.diannaopeijian.domain.Warehouse;
import com.zoo.diannaopeijian.domain.WarehouseExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WarehouseMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table warehouse
     *
     * @mbggenerated
     */
    @SelectProvider(type=WarehouseSqlProvider.class, method="countByExample")
    int countByExample(WarehouseExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table warehouse
     *
     * @mbggenerated
     */
    @DeleteProvider(type=WarehouseSqlProvider.class, method="deleteByExample")
    int deleteByExample(WarehouseExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table warehouse
     *
     * @mbggenerated
     */
    @Delete({
        "delete from warehouse",
        "where WarehouseId = #{warehouseid,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer warehouseid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table warehouse
     *
     * @mbggenerated
     */
    @Insert({
        "insert into warehouse (WarehouseId, WarehouseName, ",
        "WarehouseLocation, WarehouseNote)",
        "values (#{warehouseid,jdbcType=INTEGER}, #{warehousename,jdbcType=VARCHAR}, ",
        "#{warehouselocation,jdbcType=VARCHAR}, #{warehousenote,jdbcType=VARCHAR})"
    })
    int insert(Warehouse record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table warehouse
     *
     * @mbggenerated
     */
    @InsertProvider(type=WarehouseSqlProvider.class, method="insertSelective")
    int insertSelective(Warehouse record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table warehouse
     *
     * @mbggenerated
     */
    @SelectProvider(type=WarehouseSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="WarehouseId", property="warehouseid", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="WarehouseName", property="warehousename", jdbcType=JdbcType.VARCHAR),
        @Result(column="WarehouseLocation", property="warehouselocation", jdbcType=JdbcType.VARCHAR),
        @Result(column="WarehouseNote", property="warehousenote", jdbcType=JdbcType.VARCHAR)
    })
    List<Warehouse> selectByExample(WarehouseExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table warehouse
     *
     * @mbggenerated
     */
    @Select({
        "select",
        "WarehouseId, WarehouseName, WarehouseLocation, WarehouseNote",
        "from warehouse",
        "where WarehouseId = #{warehouseid,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="WarehouseId", property="warehouseid", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="WarehouseName", property="warehousename", jdbcType=JdbcType.VARCHAR),
        @Result(column="WarehouseLocation", property="warehouselocation", jdbcType=JdbcType.VARCHAR),
        @Result(column="WarehouseNote", property="warehousenote", jdbcType=JdbcType.VARCHAR)
    })
    Warehouse selectByPrimaryKey(Integer warehouseid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table warehouse
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WarehouseSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") Warehouse record, @Param("example") WarehouseExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table warehouse
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WarehouseSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Warehouse record, @Param("example") WarehouseExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table warehouse
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WarehouseSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(Warehouse record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table warehouse
     *
     * @mbggenerated
     */
    @Update({
        "update warehouse",
        "set WarehouseName = #{warehousename,jdbcType=VARCHAR},",
          "WarehouseLocation = #{warehouselocation,jdbcType=VARCHAR},",
          "WarehouseNote = #{warehousenote,jdbcType=VARCHAR}",
        "where WarehouseId = #{warehouseid,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(Warehouse record);

    @SelectProvider(type=WarehouseSqlProvider.class, method="selectFuzzyWarehouse")
    @Results({
            @Result(column="WarehouseId", property="warehouseid", jdbcType=JdbcType.INTEGER, id=true),
            @Result(column="WarehouseName", property="warehousename", jdbcType=JdbcType.VARCHAR),
            @Result(column="WarehouseLocation", property="warehouselocation", jdbcType=JdbcType.VARCHAR),
            @Result(column="WarehouseNote", property="warehousenote", jdbcType=JdbcType.VARCHAR)
    })
    List<Warehouse> selectFuzzyWarehouse(Warehouse warehouse);
}